<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>ottd_client_event</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://openttd-python.googlecode.com">OpenTTD-Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;ottd_client_event
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="ottd_client_event-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="ottd_client_event-module.html">Module ottd_client_event</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"># event implementation for openttd-python bot script</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module log=log-module.html"><a title="log" class="py-name" href="#" onclick="return doclink('link-0', 'log', 'link-0');">log</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable log.LOG=log-module.html#LOG,Variable ottd_client_event.LOG=ottd_client_event-module.html#LOG,Variable plugins.stats.LOG=plugins.stats-module.html#LOG,Variable webserver.LOG=webserver-module.html#LOG"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-1', 'LOG', 'link-1');">LOG</a></tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Package openttd=openttd-module.html"><a title="openttd" class="py-name" href="#" onclick="return doclink('link-2', 'openttd', 'link-2');">openttd</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Module openttd.constants=openttd.constants-module.html"><a title="openttd.constants" class="py-name" href="#" onclick="return doclink('link-3', 'constants', 'link-3');">constants</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">const</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module ottd_config=ottd_config-module.html"><a title="ottd_config" class="py-name" href="#" onclick="return doclink('link-4', 'ottd_config', 'link-4');">ottd_config</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Variable ottd_client_event.config=ottd_client_event-module.html#config,Variable ottd_config.config=ottd_config-module.html#config,Variable plugins.stats.config=plugins.stats-module.html#config"><a title="ottd_client_event.config
ottd_config.config
plugins.stats.config" class="py-name" href="#" onclick="return doclink('link-5', 'config', 'link-5');">config</a></tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="Event"></a><div id="Event-def"><a name="L10"></a><tt class="py-lineno"> 10</tt> <a class="py-toggle" href="#" id="Event-toggle" onclick="return toggle('Event');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.Event-class.html">Event</a><tt class="py-op">:</tt> </tt>
</div><div id="Event-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Event-expanded"><a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">    Base event class</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">    @cvar dispatchTo: list of dispatchers</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">    @type dispatchTo: list</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">    <tt id="link-6" class="py-name" targets="Variable ottd_client_event.Broadcast.dispatchTo=ottd_client_event.Broadcast-class.html#dispatchTo,Variable ottd_client_event.Event.dispatchTo=ottd_client_event.Event-class.html#dispatchTo,Variable ottd_client_event.IRCChat.dispatchTo=ottd_client_event.IRCChat-class.html#dispatchTo,Variable ottd_client_event.IRCPrivateActionChat.dispatchTo=ottd_client_event.IRCPrivateActionChat-class.html#dispatchTo,Variable ottd_client_event.IRCPrivateChat.dispatchTo=ottd_client_event.IRCPrivateChat-class.html#dispatchTo,Variable ottd_client_event.IRCPrivateChatResponse.dispatchTo=ottd_client_event.IRCPrivateChatResponse-class.html#dispatchTo,Variable ottd_client_event.IRCPublicActionChat.dispatchTo=ottd_client_event.IRCPublicActionChat-class.html#dispatchTo,Variable ottd_client_event.IRCPublicChat.dispatchTo=ottd_client_event.IRCPublicChat-class.html#dispatchTo,Variable ottd_client_event.IRCPublicChatResponse.dispatchTo=ottd_client_event.IRCPublicChatResponse-class.html#dispatchTo,Variable ottd_client_event.IRCToIngame.dispatchTo=ottd_client_event.IRCToIngame-class.html#dispatchTo,Variable ottd_client_event.IngameChat.dispatchTo=ottd_client_event.IngameChat-class.html#dispatchTo,Variable ottd_client_event.IngameChatResponse.dispatchTo=ottd_client_event.IngameChatResponse-class.html#dispatchTo,Variable ottd_client_event.IngameToIRC.dispatchTo=ottd_client_event.IngameToIRC-class.html#dispatchTo,Variable ottd_client_event.InternalCommand.dispatchTo=ottd_client_event.InternalCommand-class.html#dispatchTo"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-6', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToIRC"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToCmdProc"</tt><tt class="py-op">]</tt> </tt>
<a name="Event.dispatch"></a><div id="Event.dispatch-def"><a name="L17"></a><tt class="py-lineno"> 17</tt> <a class="py-toggle" href="#" id="Event.dispatch-toggle" onclick="return toggle('Event.dispatch');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.Event-class.html#dispatch">dispatch</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Event.dispatch-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Event.dispatch-expanded"><a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatch an event to all dispatchers</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-docstring">        Calls every dispatcher in dispatchTo, if it's a string, it uses getattr, else, it tries to execute</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">to</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-7', 'dispatchTo', 'link-6');">dispatchTo</a></tt><tt class="py-op">:</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-8" class="py-name" targets="Variable ottd_client_event.IRCChat.type=ottd_client_event.IRCChat-class.html#type"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-8', 'type', 'link-8');">type</a></tt><tt class="py-op">(</tt><tt class="py-name">to</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">:</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">                <tt class="py-name">to</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">                    <tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">to</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">                    <tt id="link-9" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-9', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Class sstruct.error=sstruct.error-class.html"><a title="sstruct.error" class="py-name" href="#" onclick="return doclink('link-10', 'error', 'link-10');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">"Unknown dispatcher in %s: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">,</tt> <tt class="py-name">to</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">                    <tt class="py-name">function</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="Event.sendToCmdProc"></a><div id="Event.sendToCmdProc-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="Event.sendToCmdProc-toggle" onclick="return toggle('Event.sendToCmdProc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.Event-class.html#sendToCmdProc">sendToCmdProc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Event.sendToCmdProc-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Event.sendToCmdProc-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-docstring">        The commandparser dispatcher</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.parentclient must not be None</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:  Boolean</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring">        @return: False is the preconditions are not True</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">processCommand</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div></div><a name="IngameChat"></a><div id="IngameChat-def"><a name="L44"></a><tt class="py-lineno"> 44</tt> <a class="py-toggle" href="#" id="IngameChat-toggle" onclick="return toggle('IngameChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html">IngameChat</a><tt class="py-op">(</tt><tt class="py-base-class">Event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IngameChat-expanded"><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">    this event is generated by ingame chat</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">    @cvar   dispatchTo: list of dispatchers</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">    @type   dispatchTo: list</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar         type: the type of this event (ingame, team, private)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring">    @type         type: string</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar parentclient: the parent client</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">    @type parentclient: SpectatorClass instance</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar       parent: the event that generated this event</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">    @type       parent: Event instance</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar     playerid: the id of the client that generated this event</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">    @type     playerid: number</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar playercompany: the company of the client that generated this event</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-docstring">    @type playercompany: number</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar   playername: the name of the client that generated this event</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">    @type   playername: string</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">    @ivar          msg: the message</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring">    @type          msg: string</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt id="link-11" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-11', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToIRC"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToCmdProc"</tt><tt class="py-op">]</tt> </tt>
<a name="IngameChat.__init__"></a><div id="IngameChat.__init__-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="IngameChat.__init__-toggle" onclick="return toggle('IngameChat.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">,</tt> <tt class="py-param">clientid</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">parent</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parentclient</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">type</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.__init__-expanded"><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-docstring">        Constructor for the IngameChat event</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">        @param          msg: the message</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-docstring">        @type           msg: string</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-docstring">        @param     clientid: the id of the client that generated this event</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">        @type      clientid: number</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">        @param       parent: the event that generated this event</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">        @type        parent: Event instance</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">        @param parentclient: the parent client</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">        @type  parentclient: SpectatorClass instnace</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">        @param         type: the type of this event (ingame, team, private)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">        @type          type: string</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-12', 'type', 'link-8');">type</a></tt> <tt class="py-op">=</tt> <tt id="link-13" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-13', 'type', 'link-8');">type</a></tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">parentclient</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-comment"># get stuff from parents</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-14" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-14', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-15', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-16', 'type', 'link-8');">type</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-17', 'type', 'link-8');">type</a></tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">clientid</tt> <tt class="py-op">==</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Variable ottd_client_event.IRCChat.playerid=ottd_client_event.IRCChat-class.html#playerid"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-18', 'playerid', 'link-18');">playerid</a></tt> <tt class="py-op">==</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                    <tt class="py-name">clientid</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-19', 'playerid', 'link-18');">playerid</a></tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">clientid</tt> <tt class="py-op">==</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                    <tt class="py-name">clientid</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">client_id</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-20', 'playerid', 'link-18');">playerid</a></tt> <tt class="py-op">=</tt> <tt class="py-name">clientid</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">clientid</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">playerlist</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">playerlist</tt><tt class="py-op">[</tt><tt class="py-name">clientid</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'name'</tt><tt class="py-op">]</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playercompany</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">playerlist</tt><tt class="py-op">[</tt><tt class="py-name">clientid</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'company'</tt><tt class="py-op">]</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method ottd_client_event.Event.dispatch()=ottd_client_event.Event-class.html#dispatch"><a title="ottd_client_event.Event.dispatch" class="py-name" href="#" onclick="return doclink('link-21', 'dispatch', 'link-21');">dispatch</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">     </tt>
<a name="IngameChat.__repr__"></a><div id="IngameChat.__repr__-def"><a name="L102"></a><tt class="py-lineno">102</tt> <a class="py-toggle" href="#" id="IngameChat.__repr__-toggle" onclick="return toggle('IngameChat.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.__repr__-expanded"><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring">        @todo: remove this</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"IngameChat&lt;msg='%s', playerid=%d, playername='%s', self_sent=%d, broadcast=%d, distribution=%s&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-22', 'playerid', 'link-18');">playerid</a></tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">self_sent</tt><tt class="py-op">,</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">broadcast</tt><tt class="py-op">,</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">distribution</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                <tt class="py-op">)</tt> </tt>
</div><a name="IngameChat.isCommand"></a><div id="IngameChat.isCommand-def"><a name="L114"></a><tt class="py-lineno">114</tt> <a class="py-toggle" href="#" id="IngameChat.isCommand-toggle" onclick="return toggle('IngameChat.isCommand');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#isCommand">isCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.isCommand-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.isCommand-expanded"><a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"><tt class="py-docstring">        Check if the message could be a command</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:  boolean</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring">        @return: True if the msg could be a command(starts with the command prefix)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="ottd_client_event.config
ottd_config.config
plugins.stats.config" class="py-name" href="#" onclick="return doclink('link-23', 'config', 'link-5');">config</a></tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">"main"</tt><tt class="py-op">,</tt> <tt class="py-string">"commandprefix"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="IngameChat.respond"></a><div id="IngameChat.respond-def"><a name="L121"></a><tt class="py-lineno">121</tt> <a class="py-toggle" href="#" id="IngameChat.respond-toggle" onclick="return toggle('IngameChat.respond');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#respond">respond</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.respond-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.respond-expanded"><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-docstring">        Respond to the event</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"><tt class="py-docstring">        Initializes IngameChatResponse</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"><tt class="py-docstring">        @param msg: message to respond with</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">        @type  msg: string</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-24', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-25', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"public"</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-26', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"team"</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">                <tt id="link-27" class="py-name" targets="Class ottd_client_event.IngameChatResponse=ottd_client_event.IngameChatResponse-class.html"><a title="ottd_client_event.IngameChatResponse" class="py-name" href="#" onclick="return doclink('link-27', 'IngameChatResponse', 'link-27');">IngameChatResponse</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-28', 'playerid', 'link-18');">playerid</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-29', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"private"</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                <tt id="link-30" class="py-name"><a title="ottd_client_event.IngameChatResponse" class="py-name" href="#" onclick="return doclink('link-30', 'IngameChatResponse', 'link-27');">IngameChatResponse</a></tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-31', 'playerid', 'link-18');">playerid</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="IngameChat.sendToGame"></a><div id="IngameChat.sendToGame-def"><a name="L134"></a><tt class="py-lineno">134</tt> <a class="py-toggle" href="#" id="IngameChat.sendToGame-toggle" onclick="return toggle('IngameChat.sendToGame');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#sendToGame">sendToGame</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.sendToGame-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.sendToGame-expanded"><a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatcher to game</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.type is not None</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: True if the precondition is True</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-32', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-33', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"public"</tt><tt class="py-op">:</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-34', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"team"</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-name">desttype</tt><tt class="py-op">=</tt><tt class="py-name">const</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Variable openttd.constants.DESTTYPE_TEAM=openttd.constants-module.html#DESTTYPE_TEAM"><a title="openttd.constants.DESTTYPE_TEAM" class="py-name" href="#" onclick="return doclink('link-35', 'DESTTYPE_TEAM', 'link-35');">DESTTYPE_TEAM</a></tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playercompany</tt><tt class="py-op">,</tt> <tt class="py-name">chattype</tt><tt class="py-op">=</tt><tt class="py-name">const</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Variable openttd.constants.NETWORK_ACTION_CHAT_COMPANY=openttd.constants-module.html#NETWORK_ACTION_CHAT_COMPANY"><a title="openttd.constants.NETWORK_ACTION_CHAT_COMPANY" class="py-name" href="#" onclick="return doclink('link-36', 'NETWORK_ACTION_CHAT_COMPANY', 'link-36');">NETWORK_ACTION_CHAT_COMPANY</a></tt><tt class="py-op">)</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-37', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"private"</tt><tt class="py-op">:</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-name">desttype</tt><tt class="py-op">=</tt><tt class="py-name">const</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Variable openttd.constants.DESTTYPE_CLIENT=openttd.constants-module.html#DESTTYPE_CLIENT"><a title="openttd.constants.DESTTYPE_CLIENT" class="py-name" href="#" onclick="return doclink('link-38', 'DESTTYPE_CLIENT', 'link-38');">DESTTYPE_CLIENT</a></tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-39', 'playerid', 'link-18');">playerid</a></tt><tt class="py-op">,</tt> <tt class="py-name">chattype</tt><tt class="py-op">=</tt><tt class="py-name">const</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Variable openttd.constants.NETWORK_ACTION_CHAT_CLIENT=openttd.constants-module.html#NETWORK_ACTION_CHAT_CLIENT"><a title="openttd.constants.NETWORK_ACTION_CHAT_CLIENT" class="py-name" href="#" onclick="return doclink('link-40', 'NETWORK_ACTION_CHAT_CLIENT', 'link-40');">NETWORK_ACTION_CHAT_CLIENT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="IngameChat.sendToLog"></a><div id="IngameChat.sendToLog-def"><a name="L150"></a><tt class="py-lineno">150</tt> <a class="py-toggle" href="#" id="IngameChat.sendToLog-toggle" onclick="return toggle('IngameChat.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.sendToLog-expanded"><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatcher to log</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.type is not None</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: True if the precondition is True</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-41', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-42', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"public"</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">                <tt id="link-43" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-43', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Ingame chat: &lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-44', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"team"</tt><tt class="py-op">:</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">                <tt id="link-45" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-45', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Ingame company chat: [%d]&lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playercompany</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-46', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"private"</tt><tt class="py-op">:</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">                <tt id="link-47" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-47', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Ingame private chat: &lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="IngameChat.sendToIRC"></a><div id="IngameChat.sendToIRC-def"><a name="L166"></a><tt class="py-lineno">166</tt> <a class="py-toggle" href="#" id="IngameChat.sendToIRC-toggle" onclick="return toggle('IngameChat.sendToIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#sendToIRC">sendToIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.sendToIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.sendToIRC-expanded"><a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatcher to IRC</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.type is not None</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.parentclient.irc is not None</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: the event message is not a command</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name" targets="Method ottd_client_event.IRCChat.isCommand()=ottd_client_event.IRCChat-class.html#isCommand,Method ottd_client_event.IRCPublicChat.isCommand()=ottd_client_event.IRCPublicChat-class.html#isCommand,Method ottd_client_event.IngameChat.isCommand()=ottd_client_event.IngameChat-class.html#isCommand,Method ottd_client_event.InternalCommand.isCommand()=ottd_client_event.InternalCommand-class.html#isCommand"><a title="ottd_client_event.IRCChat.isCommand
ottd_client_event.IRCPublicChat.isCommand
ottd_client_event.IngameChat.isCommand
ottd_client_event.InternalCommand.isCommand" class="py-name" href="#" onclick="return doclink('link-48', 'isCommand', 'link-48');">isCommand</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-49', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-50', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"public"</tt><tt class="py-op">:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say</tt><tt class="py-op">(</tt><tt class="py-string">"&lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt>    </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-51', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"team"</tt><tt class="py-op">:</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say</tt><tt class="py-op">(</tt><tt class="py-string">"[company: %d]&lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playercompany</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-52', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"private"</tt><tt class="py-op">:</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">bridges_ingame_irc</tt><tt class="py-op">:</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say_nick</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">bridges_ingame_irc</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">"[bridge] &lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say</tt><tt class="py-op">(</tt><tt class="py-string">"[private]&lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="IngameChat.isByOp"></a><div id="IngameChat.isByOp-def"><a name="L185"></a><tt class="py-lineno">185</tt> <a class="py-toggle" href="#" id="IngameChat.isByOp-toggle" onclick="return toggle('IngameChat.isByOp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#isByOp">isByOp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.isByOp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.isByOp-expanded"><a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line"><tt class="py-docstring">        Check if the command is from someone previledged, on IRC, this is an Op, ingame, this is the servr</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: if the event is generated by the server</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-53', 'playerid', 'link-18');">playerid</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
</div><a name="IngameChat.isFromIRC"></a><div id="IngameChat.isFromIRC-def"><a name="L192"></a><tt class="py-lineno">192</tt> <a class="py-toggle" href="#" id="IngameChat.isFromIRC-toggle" onclick="return toggle('IngameChat.isFromIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChat-class.html#isFromIRC">isFromIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChat.isFromIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChat.isFromIRC-expanded"><a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring">        Check if the event comes from IRC</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: False</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div></div><a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"> </tt>
<a name="IngameChatResponse"></a><div id="IngameChatResponse-def"><a name="L201"></a><tt class="py-lineno">201</tt> <a class="py-toggle" href="#" id="IngameChatResponse-toggle" onclick="return toggle('IngameChatResponse');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IngameChatResponse-class.html">IngameChatResponse</a><tt class="py-op">(</tt><tt class="py-base-class">IngameChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChatResponse-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IngameChatResponse-expanded"><a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">    The response to an IngameChatEvent</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">    @cvar dispatchTo: list of dispatchers</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"><tt class="py-docstring">    @type dispatchTo: list</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">    <tt id="link-54" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-54', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
<a name="IngameChatResponse.respond"></a><div id="IngameChatResponse.respond-def"><a name="L208"></a><tt class="py-lineno">208</tt> <a class="py-toggle" href="#" id="IngameChatResponse.respond-toggle" onclick="return toggle('IngameChatResponse.respond');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChatResponse-class.html#respond">respond</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChatResponse.respond-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChatResponse.respond-expanded"><a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line"><tt class="py-docstring">        Respond to the response, also known as do nothing</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"><tt class="py-docstring">        @param msg: the message to respond with</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line"><tt class="py-docstring">        @type  msg: string</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="IngameChatResponse.sendToLog"></a><div id="IngameChatResponse.sendToLog-def"><a name="L215"></a><tt class="py-lineno">215</tt> <a class="py-toggle" href="#" id="IngameChatResponse.sendToLog-toggle" onclick="return toggle('IngameChatResponse.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IngameChatResponse-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameChatResponse.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IngameChatResponse.sendToLog-expanded"><a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"><tt class="py-docstring">        The event dispatcher to LOG</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.type is not None</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: True if the preconditions are true</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-55', 'type', 'link-8');">type</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-56', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"public"</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">            <tt id="link-57" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-57', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Ingame public chat response: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-58', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"team"</tt><tt class="py-op">:</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">            <tt id="link-59" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-59', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Ingame team chat response: &lt;To: %s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playercompany</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-60', 'type', 'link-8');">type</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"private"</tt><tt class="py-op">:</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">            <tt id="link-61" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-61', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Ingame private chat response: &lt;To: %s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div></div><a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">         </tt>
<a name="IRCChat"></a><div id="IRCChat-def"><a name="L233"></a><tt class="py-lineno">233</tt> <a class="py-toggle" href="#" id="IRCChat-toggle" onclick="return toggle('IRCChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCChat-class.html">IRCChat</a><tt class="py-op">(</tt><tt class="py-base-class">Event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCChat-expanded"><a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"><tt class="py-docstring">        event generated by IRC chat</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">    <tt id="link-62" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-62', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToLog"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToCmdProc"</tt><tt class="py-op">]</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">    <tt id="link-63" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-63', 'type', 'link-8');">type</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">    <tt id="link-64" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-64', 'playerid', 'link-18');">playerid</a></tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="IRCChat.__init__"></a><div id="IRCChat.__init__-def"><a name="L240"></a><tt class="py-lineno">240</tt> <a class="py-toggle" href="#" id="IRCChat.__init__-toggle" onclick="return toggle('IRCChat.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCChat-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">,</tt> <tt class="py-param">nickname</tt><tt class="py-op">,</tt> <tt class="py-param">parentclient</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parent</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parentircevent</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCChat.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCChat.__init__-expanded"><a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">parentclient</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">parentircevent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> <tt class="py-op">=</tt> <tt class="py-name">parentircevent</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt> <tt class="py-op">=</tt> <tt class="py-name">nickname</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="ottd_client_event.Event.dispatch" class="py-name" href="#" onclick="return doclink('link-65', 'dispatch', 'link-21');">dispatch</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCChat.isCommand"></a><div id="IRCChat.isCommand-def"><a name="L253"></a><tt class="py-lineno">253</tt> <a class="py-toggle" href="#" id="IRCChat.isCommand-toggle" onclick="return toggle('IRCChat.isCommand');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCChat-class.html#isCommand">isCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCChat.isCommand-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCChat.isCommand-expanded"><a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt id="link-66" class="py-name"><a title="ottd_client_event.config
ottd_config.config
plugins.stats.config" class="py-name" href="#" onclick="return doclink('link-66', 'config', 'link-5');">config</a></tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">"main"</tt><tt class="py-op">,</tt> <tt class="py-string">"commandprefix"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCChat.sendToGame"></a><div id="IRCChat.sendToGame-def"><a name="L255"></a><tt class="py-lineno">255</tt> <a class="py-toggle" href="#" id="IRCChat.sendToGame-toggle" onclick="return toggle('IRCChat.sendToGame');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCChat-class.html#sendToGame">sendToGame</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCChat.sendToGame-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCChat.sendToGame-expanded"><a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="ottd_client_event.IRCChat.isCommand
ottd_client_event.IRCPublicChat.isCommand
ottd_client_event.IngameChat.isCommand
ottd_client_event.InternalCommand.isCommand" class="py-name" href="#" onclick="return doclink('link-67', 'isCommand', 'link-48');">isCommand</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># don't forward commands to game</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-string">"&lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="IRCChat.sendToIRC"></a><div id="IRCChat.sendToIRC-def"><a name="L260"></a><tt class="py-lineno">260</tt> <a class="py-toggle" href="#" id="IRCChat.sendToIRC-toggle" onclick="return toggle('IRCChat.sendToIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCChat-class.html#sendToIRC">sendToIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCChat.sendToIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCChat.sendToIRC-expanded"><a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="ottd_client_event.IRCChat.isCommand
ottd_client_event.IRCPublicChat.isCommand
ottd_client_event.IngameChat.isCommand
ottd_client_event.InternalCommand.isCommand" class="py-name" href="#" onclick="return doclink('link-68', 'isCommand', 'link-48');">isCommand</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCChat.isFromIRC"></a><div id="IRCChat.isFromIRC-def"><a name="L264"></a><tt class="py-lineno">264</tt> <a class="py-toggle" href="#" id="IRCChat.isFromIRC-toggle" onclick="return toggle('IRCChat.isFromIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCChat-class.html#isFromIRC">isFromIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCChat.isFromIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCChat.isFromIRC-expanded"><a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div></div><a name="IRCPublicChat"></a><div id="IRCPublicChat-def"><a name="L266"></a><tt class="py-lineno">266</tt> <a class="py-toggle" href="#" id="IRCPublicChat-toggle" onclick="return toggle('IRCPublicChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html">IRCPublicChat</a><tt class="py-op">(</tt><tt class="py-base-class">IRCChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPublicChat-expanded"><a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line"><tt class="py-docstring">        event is generated by IRC channel chat</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">    <tt id="link-69" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-69', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToCmdProc"</tt><tt class="py-op">]</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">    <tt id="link-70" class="py-name"><a title="ottd_client_event.IRCChat.type" class="py-name" href="#" onclick="return doclink('link-70', 'type', 'link-8');">type</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">    <tt id="link-71" class="py-name"><a title="ottd_client_event.IRCChat.playerid" class="py-name" href="#" onclick="return doclink('link-71', 'playerid', 'link-18');">playerid</a></tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="IRCPublicChat.__init__"></a><div id="IRCPublicChat.__init__-def"><a name="L273"></a><tt class="py-lineno">273</tt> <a class="py-toggle" href="#" id="IRCPublicChat.__init__-toggle" onclick="return toggle('IRCPublicChat.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">,</tt> <tt class="py-param">nickname</tt><tt class="py-op">,</tt> <tt class="py-param">parentclient</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parent</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parentircevent</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.__init__-expanded"><a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">parentclient</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">parentircevent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> <tt class="py-op">=</tt> <tt class="py-name">parentircevent</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt> <tt class="py-op">=</tt> <tt class="py-name">nickname</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-72" class="py-name"><a title="ottd_client_event.Event.dispatch" class="py-name" href="#" onclick="return doclink('link-72', 'dispatch', 'link-21');">dispatch</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPublicChat.isCommand"></a><div id="IRCPublicChat.isCommand-def"><a name="L286"></a><tt class="py-lineno">286</tt> <a class="py-toggle" href="#" id="IRCPublicChat.isCommand-toggle" onclick="return toggle('IRCPublicChat.isCommand');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#isCommand">isCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.isCommand-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.isCommand-expanded"><a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt id="link-73" class="py-name"><a title="ottd_client_event.config
ottd_config.config
plugins.stats.config" class="py-name" href="#" onclick="return doclink('link-73', 'config', 'link-5');">config</a></tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">"main"</tt><tt class="py-op">,</tt> <tt class="py-string">"commandprefix"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPublicChat.sendToGame"></a><div id="IRCPublicChat.sendToGame-def"><a name="L288"></a><tt class="py-lineno">288</tt> <a class="py-toggle" href="#" id="IRCPublicChat.sendToGame-toggle" onclick="return toggle('IRCPublicChat.sendToGame');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#sendToGame">sendToGame</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.sendToGame-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.sendToGame-expanded"><a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="ottd_client_event.IRCChat.isCommand
ottd_client_event.IRCPublicChat.isCommand
ottd_client_event.IngameChat.isCommand
ottd_client_event.InternalCommand.isCommand" class="py-name" href="#" onclick="return doclink('link-74', 'isCommand', 'link-48');">isCommand</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># don't forward commands to game</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-string">"&lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="IRCPublicChat.sendToIRC"></a><div id="IRCPublicChat.sendToIRC-def"><a name="L293"></a><tt class="py-lineno">293</tt> <a class="py-toggle" href="#" id="IRCPublicChat.sendToIRC-toggle" onclick="return toggle('IRCPublicChat.sendToIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#sendToIRC">sendToIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.sendToIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.sendToIRC-expanded"><a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="ottd_client_event.IRCChat.isCommand
ottd_client_event.IRCPublicChat.isCommand
ottd_client_event.IngameChat.isCommand
ottd_client_event.InternalCommand.isCommand" class="py-name" href="#" onclick="return doclink('link-75', 'isCommand', 'link-48');">isCommand</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPublicChat.sendToLog"></a><div id="IRCPublicChat.sendToLog-def"><a name="L297"></a><tt class="py-lineno">297</tt> <a class="py-toggle" href="#" id="IRCPublicChat.sendToLog-toggle" onclick="return toggle('IRCPublicChat.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.sendToLog-expanded"><a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">        <tt id="link-76" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-76', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"IRC chat: &lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="IRCPublicChat.respond"></a><div id="IRCPublicChat.respond-def"><a name="L300"></a><tt class="py-lineno">300</tt> <a class="py-toggle" href="#" id="IRCPublicChat.respond-toggle" onclick="return toggle('IRCPublicChat.respond');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#respond">respond</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.respond-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.respond-expanded"><a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">        <tt id="link-77" class="py-name" targets="Class ottd_client_event.IRCPublicChatResponse=ottd_client_event.IRCPublicChatResponse-class.html"><a title="ottd_client_event.IRCPublicChatResponse" class="py-name" href="#" onclick="return doclink('link-77', 'IRCPublicChatResponse', 'link-77');">IRCPublicChatResponse</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">parent</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPublicChat.isByOp"></a><div id="IRCPublicChat.isByOp-def"><a name="L302"></a><tt class="py-lineno">302</tt> <a class="py-toggle" href="#" id="IRCPublicChat.isByOp-toggle" onclick="return toggle('IRCPublicChat.isByOp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChat-class.html#isByOp">isByOp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChat.isByOp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChat.isByOp-expanded"><a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">bot</tt><tt class="py-op">.</tt><tt class="py-name">channels</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentircevent</tt><tt class="py-op">.</tt><tt class="py-name">target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">is_oper</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line"> </tt>
<a name="IRCPublicChatResponse"></a><div id="IRCPublicChatResponse-def"><a name="L307"></a><tt class="py-lineno">307</tt> <a class="py-toggle" href="#" id="IRCPublicChatResponse-toggle" onclick="return toggle('IRCPublicChatResponse');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChatResponse-class.html">IRCPublicChatResponse</a><tt class="py-op">(</tt><tt class="py-base-class">IRCPublicChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChatResponse-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPublicChatResponse-expanded"><a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">    <tt id="link-78" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-78', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToIRC"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
<a name="IRCPublicChatResponse.sendToLog"></a><div id="IRCPublicChatResponse.sendToLog-def"><a name="L309"></a><tt class="py-lineno">309</tt> <a class="py-toggle" href="#" id="IRCPublicChatResponse.sendToLog-toggle" onclick="return toggle('IRCPublicChatResponse.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicChatResponse-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicChatResponse.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicChatResponse.sendToLog-expanded"><a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt id="link-79" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-79', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"IRC chat response: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"> </tt>
<a name="IRCPrivateChat"></a><div id="IRCPrivateChat-def"><a name="L312"></a><tt class="py-lineno">312</tt> <a class="py-toggle" href="#" id="IRCPrivateChat-toggle" onclick="return toggle('IRCPrivateChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChat-class.html">IRCPrivateChat</a><tt class="py-op">(</tt><tt class="py-base-class">IRCChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPrivateChat-expanded"><a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line"><tt class="py-docstring">        event is generated by IRC private chat</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">    <tt id="link-80" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-80', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToLog"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToCmdProc"</tt><tt class="py-op">]</tt> </tt>
<a name="IRCPrivateChat.sendToLog"></a><div id="IRCPrivateChat.sendToLog-def"><a name="L317"></a><tt class="py-lineno">317</tt> <a class="py-toggle" href="#" id="IRCPrivateChat.sendToLog-toggle" onclick="return toggle('IRCPrivateChat.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChat-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChat.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateChat.sendToLog-expanded"><a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt id="link-81" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-81', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"IRC private chat: &lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="IRCPrivateChat.sendToGame"></a><div id="IRCPrivateChat.sendToGame-def"><a name="L320"></a><tt class="py-lineno">320</tt> <a class="py-toggle" href="#" id="IRCPrivateChat.sendToGame-toggle" onclick="return toggle('IRCPrivateChat.sendToGame');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChat-class.html#sendToGame">sendToGame</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChat.sendToGame-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateChat.sendToGame-expanded"><a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">bridges_irc_ingame</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="ottd_client_event.IRCChat.isCommand
ottd_client_event.IRCPublicChat.isCommand
ottd_client_event.IngameChat.isCommand
ottd_client_event.InternalCommand.isCommand" class="py-name" href="#" onclick="return doclink('link-82', 'isCommand', 'link-48');">isCommand</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">            <tt class="py-name">playername</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">bridges_irc_ingame</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">]</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt id="link-83" class="py-name" targets="Module openttd.client=openttd.client-module.html"><a title="openttd.client" class="py-name" href="#" onclick="return doclink('link-83', 'client', 'link-83');">client</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">playerlist</tt><tt class="py-op">:</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">playerlist</tt><tt class="py-op">[</tt><tt id="link-84" class="py-name"><a title="openttd.client" class="py-name" href="#" onclick="return doclink('link-84', 'client', 'link-83');">client</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'name'</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">playername</tt><tt class="py-op">:</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-string">"[bridge] &lt;%s&gt; %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">desttype</tt><tt class="py-op">=</tt><tt class="py-name">const</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="openttd.constants.DESTTYPE_CLIENT" class="py-name" href="#" onclick="return doclink('link-85', 'DESTTYPE_CLIENT', 'link-38');">DESTTYPE_CLIENT</a></tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">playerlist</tt><tt class="py-op">[</tt><tt id="link-86" class="py-name"><a title="openttd.client" class="py-name" href="#" onclick="return doclink('link-86', 'client', 'link-83');">client</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">chattype</tt><tt class="py-op">=</tt><tt class="py-name">const</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="openttd.constants.NETWORK_ACTION_CHAT_CLIENT" class="py-name" href="#" onclick="return doclink('link-87', 'NETWORK_ACTION_CHAT_CLIENT', 'link-40');">NETWORK_ACTION_CHAT_CLIENT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt><tt class="py-op">;</tt> </tt>
</div><a name="IRCPrivateChat.respond"></a><div id="IRCPrivateChat.respond-def"><a name="L327"></a><tt class="py-lineno">327</tt> <a class="py-toggle" href="#" id="IRCPrivateChat.respond-toggle" onclick="return toggle('IRCPrivateChat.respond');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChat-class.html#respond">respond</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChat.respond-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateChat.respond-expanded"><a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">        <tt id="link-88" class="py-name" targets="Class ottd_client_event.IRCPrivateChatResponse=ottd_client_event.IRCPrivateChatResponse-class.html"><a title="ottd_client_event.IRCPrivateChatResponse" class="py-name" href="#" onclick="return doclink('link-88', 'IRCPrivateChatResponse', 'link-88');">IRCPrivateChatResponse</a></tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">parent</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPrivateChat.isByOp"></a><div id="IRCPrivateChat.isByOp-def"><a name="L329"></a><tt class="py-lineno">329</tt> <a class="py-toggle" href="#" id="IRCPrivateChat.isByOp-toggle" onclick="return toggle('IRCPrivateChat.isByOp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChat-class.html#isByOp">isByOp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChat.isByOp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateChat.isByOp-expanded"><a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div></div><a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line"> </tt>
<a name="IRCPrivateChatResponse"></a><div id="IRCPrivateChatResponse-def"><a name="L332"></a><tt class="py-lineno">332</tt> <a class="py-toggle" href="#" id="IRCPrivateChatResponse-toggle" onclick="return toggle('IRCPrivateChatResponse');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChatResponse-class.html">IRCPrivateChatResponse</a><tt class="py-op">(</tt><tt class="py-base-class">IRCPrivateChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChatResponse-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPrivateChatResponse-expanded"><a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">    <tt id="link-89" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-89', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToIRC"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
<a name="IRCPrivateChatResponse.sendToLog"></a><div id="IRCPrivateChatResponse.sendToLog-def"><a name="L334"></a><tt class="py-lineno">334</tt> <a class="py-toggle" href="#" id="IRCPrivateChatResponse.sendToLog-toggle" onclick="return toggle('IRCPrivateChatResponse.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChatResponse-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChatResponse.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateChatResponse.sendToLog-expanded"><a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">        <tt id="link-90" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-90', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"IRC private chat response to %s: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPrivateChatResponse.sendToIRC"></a><div id="IRCPrivateChatResponse.sendToIRC-def"><a name="L336"></a><tt class="py-lineno">336</tt> <a class="py-toggle" href="#" id="IRCPrivateChatResponse.sendToIRC-toggle" onclick="return toggle('IRCPrivateChatResponse.sendToIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateChatResponse-class.html#sendToIRC">sendToIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateChatResponse.sendToIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateChatResponse.sendToIRC-expanded"><a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say_nick</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"> </tt>
<a name="IRCPrivateNoticeChat"></a><div id="IRCPrivateNoticeChat-def"><a name="L341"></a><tt class="py-lineno">341</tt> <a class="py-toggle" href="#" id="IRCPrivateNoticeChat-toggle" onclick="return toggle('IRCPrivateNoticeChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateNoticeChat-class.html">IRCPrivateNoticeChat</a><tt class="py-op">(</tt><tt class="py-base-class">IRCPrivateChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateNoticeChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPrivateNoticeChat-expanded"><a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"><tt class="py-docstring">        event is generated by IRC notice chat</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="IRCPrivateNoticeChat.respond"></a><div id="IRCPrivateNoticeChat.respond-def"><a name="L345"></a><tt class="py-lineno">345</tt> <a class="py-toggle" href="#" id="IRCPrivateNoticeChat.respond-toggle" onclick="return toggle('IRCPrivateNoticeChat.respond');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateNoticeChat-class.html#respond">respond</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateNoticeChat.respond-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateNoticeChat.respond-expanded"><a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">        <tt id="link-91" class="py-name" targets="Class ottd_client_event.IRCPrivateNoticeChatResponse=ottd_client_event.IRCPrivateNoticeChatResponse-class.html"><a title="ottd_client_event.IRCPrivateNoticeChatResponse" class="py-name" href="#" onclick="return doclink('link-91', 'IRCPrivateNoticeChatResponse', 'link-91');">IRCPrivateNoticeChatResponse</a></tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">parent</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="IRCPrivateNoticeChatResponse"></a><div id="IRCPrivateNoticeChatResponse-def"><a name="L347"></a><tt class="py-lineno">347</tt> <a class="py-toggle" href="#" id="IRCPrivateNoticeChatResponse-toggle" onclick="return toggle('IRCPrivateNoticeChatResponse');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateNoticeChatResponse-class.html">IRCPrivateNoticeChatResponse</a><tt class="py-op">(</tt><tt class="py-base-class">IRCPrivateChatResponse</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateNoticeChatResponse-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPrivateNoticeChatResponse-expanded"><a name="IRCPrivateNoticeChatResponse.sendToIRC"></a><div id="IRCPrivateNoticeChatResponse.sendToIRC-def"><a name="L348"></a><tt class="py-lineno">348</tt> <a class="py-toggle" href="#" id="IRCPrivateNoticeChatResponse.sendToIRC-toggle" onclick="return toggle('IRCPrivateNoticeChatResponse.sendToIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateNoticeChatResponse-class.html#sendToIRC">sendToIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateNoticeChatResponse.sendToIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateNoticeChatResponse.sendToIRC-expanded"><a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">notice</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">         </tt>
<a name="Broadcast"></a><div id="Broadcast-def"><a name="L353"></a><tt class="py-lineno">353</tt> <a class="py-toggle" href="#" id="Broadcast-toggle" onclick="return toggle('Broadcast');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.Broadcast-class.html">Broadcast</a><tt class="py-op">(</tt><tt class="py-base-class">IngameChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Broadcast-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Broadcast-expanded"><a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line"><tt class="py-docstring">    This event is generated by the bot itself when it needs to broadcast something</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line"><tt class="py-docstring">    @cvar dispatchTo: list of dispatchers</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line"><tt class="py-docstring">    @type dispatchTo: list</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">    <tt id="link-92" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-92', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToIRC"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
<a name="Broadcast.sendToGame"></a><div id="Broadcast.sendToGame-def"><a name="L360"></a><tt class="py-lineno">360</tt> <a class="py-toggle" href="#" id="Broadcast.sendToGame-toggle" onclick="return toggle('Broadcast.sendToGame');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.Broadcast-class.html#sendToGame">sendToGame</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Broadcast.sendToGame-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Broadcast.sendToGame-expanded"><a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatcher to game</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: True</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="Broadcast.sendToIRC"></a><div id="Broadcast.sendToIRC-def"><a name="L368"></a><tt class="py-lineno">368</tt> <a class="py-toggle" href="#" id="Broadcast.sendToIRC-toggle" onclick="return toggle('Broadcast.sendToIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.Broadcast-class.html#sendToIRC">sendToIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Broadcast.sendToIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Broadcast.sendToIRC-expanded"><a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatcher to IRC</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line"><tt class="py-docstring">        @precondition: self.parentclient.irc is not None</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: True if the precondition is True</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">irc</tt><tt class="py-op">.</tt><tt class="py-name">say</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="Broadcast.sendToLog"></a><div id="Broadcast.sendToLog-def"><a name="L379"></a><tt class="py-lineno">379</tt> <a class="py-toggle" href="#" id="Broadcast.sendToLog-toggle" onclick="return toggle('Broadcast.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.Broadcast-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Broadcast.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Broadcast.sendToLog-expanded"><a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line"><tt class="py-docstring">        Dispatcher to LOG</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: boolean</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line"><tt class="py-docstring">        @returns: True</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">        <tt id="link-93" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-93', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"EVENT: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div></div><a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line"> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">         </tt>
<a name="IngameToIRC"></a><div id="IngameToIRC-def"><a name="L389"></a><tt class="py-lineno">389</tt> <a class="py-toggle" href="#" id="IngameToIRC-toggle" onclick="return toggle('IngameToIRC');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IngameToIRC-class.html">IngameToIRC</a><tt class="py-op">(</tt><tt class="py-base-class">Broadcast</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IngameToIRC-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IngameToIRC-expanded"><a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line"><tt class="py-docstring">        this event is generated by join/quit messages</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">    <tt id="link-94" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-94', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToIRC"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
</div><a name="IRCToIngame"></a><div id="IRCToIngame-def"><a name="L394"></a><tt class="py-lineno">394</tt> <a class="py-toggle" href="#" id="IRCToIngame-toggle" onclick="return toggle('IRCToIngame');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCToIngame-class.html">IRCToIngame</a><tt class="py-op">(</tt><tt class="py-base-class">Broadcast</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCToIngame-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCToIngame-expanded"><a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"><tt class="py-docstring">        this event is generated by internal messages from irc"</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">    <tt id="link-95" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-95', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
</div><a name="IRCPublicActionChat"></a><div id="IRCPublicActionChat-def"><a name="L399"></a><tt class="py-lineno">399</tt> <a class="py-toggle" href="#" id="IRCPublicActionChat-toggle" onclick="return toggle('IRCPublicActionChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicActionChat-class.html">IRCPublicActionChat</a><tt class="py-op">(</tt><tt class="py-base-class">IRCPublicChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicActionChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPublicActionChat-expanded"><a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line"><tt class="py-docstring">        this event is generated by irc /me messages</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">    <tt id="link-96" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-96', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToGame"</tt><tt class="py-op">,</tt> <tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
<a name="IRCPublicActionChat.sendToGame"></a><div id="IRCPublicActionChat.sendToGame-def"><a name="L404"></a><tt class="py-lineno">404</tt> <a class="py-toggle" href="#" id="IRCPublicActionChat.sendToGame-toggle" onclick="return toggle('IRCPublicActionChat.sendToGame');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicActionChat-class.html#sendToGame">sendToGame</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicActionChat.sendToGame-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicActionChat.sendToGame-expanded"><a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">.</tt><tt class="py-name">sendChat</tt><tt class="py-op">(</tt><tt class="py-string">"* %s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="IRCPublicActionChat.sendToLog"></a><div id="IRCPublicActionChat.sendToLog-def"><a name="L406"></a><tt class="py-lineno">406</tt> <a class="py-toggle" href="#" id="IRCPublicActionChat.sendToLog-toggle" onclick="return toggle('IRCPublicActionChat.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPublicActionChat-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPublicActionChat.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPublicActionChat.sendToLog-expanded"><a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">        <tt id="link-97" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-97', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"IRC action: * %s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="IRCPrivateActionChat"></a><div id="IRCPrivateActionChat-def"><a name="L408"></a><tt class="py-lineno">408</tt> <a class="py-toggle" href="#" id="IRCPrivateActionChat-toggle" onclick="return toggle('IRCPrivateActionChat');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateActionChat-class.html">IRCPrivateActionChat</a><tt class="py-op">(</tt><tt class="py-base-class">IRCPrivateChat</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateActionChat-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IRCPrivateActionChat-expanded"><a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line"><tt class="py-docstring">        this event is generated by irc private /me messages</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">    <tt id="link-98" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-98', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToLog"</tt><tt class="py-op">]</tt> </tt>
<a name="IRCPrivateActionChat.sendToLog"></a><div id="IRCPrivateActionChat.sendToLog-def"><a name="L413"></a><tt class="py-lineno">413</tt> <a class="py-toggle" href="#" id="IRCPrivateActionChat.sendToLog-toggle" onclick="return toggle('IRCPrivateActionChat.sendToLog');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.IRCPrivateActionChat-class.html#sendToLog">sendToLog</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IRCPrivateActionChat.sendToLog-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IRCPrivateActionChat.sendToLog-expanded"><a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">        <tt id="link-99" class="py-name"><a title="log.LOG
ottd_client_event.LOG
plugins.stats.LOG
webserver.LOG" class="py-name" href="#" onclick="return doclink('link-99', 'LOG', 'link-1');">LOG</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"IRC private action: * %s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">playername</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="InternalCommand"></a><div id="InternalCommand-def"><a name="L415"></a><tt class="py-lineno">415</tt> <a class="py-toggle" href="#" id="InternalCommand-toggle" onclick="return toggle('InternalCommand');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="ottd_client_event.InternalCommand-class.html">InternalCommand</a><tt class="py-op">(</tt><tt class="py-base-class">Event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="InternalCommand-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="InternalCommand-expanded"><a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">    <tt id="link-100" class="py-name"><a title="ottd_client_event.Broadcast.dispatchTo
ottd_client_event.Event.dispatchTo
ottd_client_event.IRCChat.dispatchTo
ottd_client_event.IRCPrivateActionChat.dispatchTo
ottd_client_event.IRCPrivateChat.dispatchTo
ottd_client_event.IRCPrivateChatResponse.dispatchTo
ottd_client_event.IRCPublicActionChat.dispatchTo
ottd_client_event.IRCPublicChat.dispatchTo
ottd_client_event.IRCPublicChatResponse.dispatchTo
ottd_client_event.IRCToIngame.dispatchTo
ottd_client_event.IngameChat.dispatchTo
ottd_client_event.IngameChatResponse.dispatchTo
ottd_client_event.IngameToIRC.dispatchTo
ottd_client_event.InternalCommand.dispatchTo" class="py-name" href="#" onclick="return doclink('link-100', 'dispatchTo', 'link-6');">dispatchTo</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">"sendToCmdProc"</tt><tt class="py-op">]</tt> </tt>
<a name="InternalCommand.__init__"></a><div id="InternalCommand.__init__-def"><a name="L417"></a><tt class="py-lineno">417</tt> <a class="py-toggle" href="#" id="InternalCommand.__init__-toggle" onclick="return toggle('InternalCommand.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.InternalCommand-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">,</tt> <tt class="py-param">parentclient</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="InternalCommand.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="InternalCommand.__init__-expanded"><a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt> <tt class="py-op">=</tt> <tt class="py-name">parentclient</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="ottd_client_event.Event.dispatch" class="py-name" href="#" onclick="return doclink('link-101', 'dispatch', 'link-21');">dispatch</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="InternalCommand.respond"></a><div id="InternalCommand.respond-def"><a name="L421"></a><tt class="py-lineno">421</tt> <a class="py-toggle" href="#" id="InternalCommand.respond-toggle" onclick="return toggle('InternalCommand.respond');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.InternalCommand-class.html#respond">respond</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="InternalCommand.respond-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="InternalCommand.respond-expanded"><a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">        <tt class="py-comment"># this should not happen.</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">        <tt id="link-102" class="py-name" targets="Class ottd_client_event.Broadcast=ottd_client_event.Broadcast-class.html"><a title="ottd_client_event.Broadcast" class="py-name" href="#" onclick="return doclink('link-102', 'Broadcast', 'link-102');">Broadcast</a></tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-name">parentclient</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parentclient</tt><tt class="py-op">,</tt> <tt class="py-name">parent</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="InternalCommand.isByOp"></a><div id="InternalCommand.isByOp-def"><a name="L424"></a><tt class="py-lineno">424</tt> <a class="py-toggle" href="#" id="InternalCommand.isByOp-toggle" onclick="return toggle('InternalCommand.isByOp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.InternalCommand-class.html#isByOp">isByOp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="InternalCommand.isByOp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="InternalCommand.isByOp-expanded"><a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="InternalCommand.isCommand"></a><div id="InternalCommand.isCommand-def"><a name="L426"></a><tt class="py-lineno">426</tt> <a class="py-toggle" href="#" id="InternalCommand.isCommand-toggle" onclick="return toggle('InternalCommand.isCommand');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.InternalCommand-class.html#isCommand">isCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="InternalCommand.isCommand-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="InternalCommand.isCommand-expanded"><a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="InternalCommand.isFromIRC"></a><div id="InternalCommand.isFromIRC-def"><a name="L428"></a><tt class="py-lineno">428</tt> <a class="py-toggle" href="#" id="InternalCommand.isFromIRC-toggle" onclick="return toggle('InternalCommand.isFromIRC');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="ottd_client_event.InternalCommand-class.html#isFromIRC">isFromIRC</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="InternalCommand.isFromIRC-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="InternalCommand.isFromIRC-expanded"><a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div></div><a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://openttd-python.googlecode.com">OpenTTD-Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Oct 20 13:03:13 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
